package com.numberone.web.controller.industry;

import com.numberone.common.page.TableDataInfo;
import com.numberone.framework.web.base.BaseController;
import com.numberone.system.domain.Industry;
import com.numberone.system.service.IIndustryService;
import com.numberone.system.util.JsonResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;

/**
 * 全站类目 信息操作处理
 *
 * @author 郭财源
 * @date 2020-09-28
 */
@Controller
@RequestMapping("/api/Industry")
public class IndustryApiController extends BaseController {

    @Autowired
    private IIndustryService industryService;

    @ResponseBody
    @RequestMapping("/getIndustryList")
    public JsonResult getIndustryList()
    {
        List<Industry> industries = industryService.selectIndustryList();
        TableDataInfo dataTable = getDataTable(industries);
        return JsonResult.success(dataTable);
    }
}
